package org.test.service;

import java.util.List;

import org.lojzes.lojzesframework.dao.MyPreDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.test.model.Student;

@Service
public class Service01 {
	@Autowired
	private MyPreDao myPreDao;

	public void setMyPreDao(MyPreDao myPreDao) {
		this.myPreDao = myPreDao;
	}

	public void add(Student student) {
		myPreDao.add(student);
	}
	public Student getStudentById(Integer id){
		return myPreDao.getStudentById(id);
	}
	public String getStudentNameById(Integer id){
		return myPreDao.getStudentNameById(id);
	}
	public List<Student> getStudents(){
		return myPreDao.getStudents();
	}
}
